CWebStorage Class  
 

Store and manage application data remotely. It is intended for application settings, configuration files, user preferences, and other relatively small amounts of data that need to be available beyond the local computer. The class uses secure services provided by SocketTools servers without requiring accounts with other cloud service providers.

Reference

Library Information

Class Name CWebStorage
File Name CSWEBV12.DLL
Version 12.0.3041.1380
LibID ECC96063-0D95-4378-A747-E0040B8618F1
Import Library CSWEBV12.LIB
Dependencies None

Overview

The CWebStorage class provides a straightforward way to securely store and retrieve application data hosted on SocketTools servers. Data is stored as named objects within storage containers. An object can contain text, binary data, or the contents of a local file, allowing applications to use the format that best fits their requirements. For example, an application can store configuration settings as a text object or upload an existing settings file directly. Methods for working with strings, memory buffers, and files simplify transferring data between the application and remote storage.

Application identifiers organize stored data and determine which application can access it. Developers can use separate identifiers for different products or versions, or use a common identifier when data should be shared. Storage containers provide additional control over the scope of that data: global storage makes objects available to all users of the application, while other container types associate objects with a particular Windows domain or workgroup, computer, or user account. Data associated with a specific system or user configuration may become inaccessible if that configuration changes, so these containers are best suited to information that can be recreated when necessary.

The class supports managing stored objects throughout their lifecycle. Applications can enumerate objects, retrieve their metadata, examine their size and modification time, and copy, move, rename, or delete them. Comparison methods can determine whether a stored object matches a local file, memory buffer, or string, helping applications decide when an update is needed. Together, these features support maintaining shared configuration data and keeping remote copies of application settings.

The class communicates with SocketTools API servers using HTTPS over TCP port 443, with TLS 1.3 or TLS 1.2 securing the connection. On networks that restrict outbound traffic, firewall rules must allow the application to connect to these servers on that port. Applications can check account quotas, including available storage, maximum object size, and object count limits, to plan their use of the service. Progress notifications, transfer status information, cancellation, and configurable timeouts provide control over storage operations and help applications remain responsive while transferring data.

As an additional convenience, the class includes a GeoIP lookup method that returns approximate location information associated with the local system's external IP address. Applications can use this information to suggest regional defaults, such as a country or time zone. GeoIP results may reflect the location of a VPN or proxy server and should be treated as approximate, with users given an opportunity to confirm or correct them. This capability complements the primary purpose of providing simple remote storage for application data.

Requirements

The SocketTools Library Edition is compatible with any programming language that can call functions exported from a standard Windows DLL. If you are using Visual Studio, the minimum supported version is Visual Studio 2010 with Service Pack 1 (SP1). The header files are compatible with modern C/C++ compilers, and function declarations are provided for several other languages. We recommend installing the latest updates for your development tools and the Windows SDK.

SocketTools supports Windows 7 SP1, Windows Server 2008 R2 SP1, and later desktop and server versions of Windows, with Windows 8.1 as the minimum supported version for Windows 8-based systems. Both 32-bit and 64-bit Windows platforms are supported for application development. Windows on ARM requires Windows 10 build 1709 or later. We recommend using a version of Windows that is currently supported by Microsoft for application development.

SocketTools provides 32-bit x86, 64-bit x64, and native ARM64 libraries. The x86 libraries maintain compatibility with legacy development tools and can run under emulation on Windows on ARM. Native ARM32 applications are not supported because Microsoft discontinued support for 32-bit ARM applications in Windows.

For native ARM64 development, we recommend Visual Studio 2019 or later. Some development tools, including recent versions of Embarcadero Delphi, support Windows on ARM using the ARM64EC architecture. ARM64EC applications can use x64 DLLs through emulation, but cannot load native ARM64 DLLs. Developers targeting ARM64EC should use the SocketTools x64 libraries rather than the native ARM64 libraries.

Import libraries are provided in COFF format for x86, x64, and ARM64 platforms. OMF libraries are also provided for x86, and ELF libraries for x64, to support older Borland and Embarcadero compilers. Visual Studio developers should use the standard COFF libraries. Some programming languages can call exported DLL functions directly without requiring an import library.

Distribution

When distributing an application that uses this library, we recommend installing the SocketTools DLL in the same folder as the application executable. This simplifies deployment and avoids potential conflicts with other applications that use different versions of the library. The DLL must be compatible with the application's processor architecture (x86, x64, or ARM64). If the library is installed in a shared system location, the installer should manage it as a shared DLL to prevent other applications from being affected when it is updated or removed. SocketTools libraries are standard Windows DLLs, not ActiveX components, and do not require COM registration.

This library has no external runtime dependencies beyond the standard Windows system libraries. It does not require the Microsoft Visual C++ Redistributable or any additional third-party libraries to be installed. All required components are either provided by Windows or statically linked into the SocketTools DLLs, simplifying deployment and eliminating the need to distribute additional runtime files.